1. Field of the Invention
The invention relates to a method and system for image compression and, more particularly, to a method and system for allocating bits for representing blocks that are transmitted in an image compression system.
2. State of the Art
Enormous numbers of bits are used to represent images in electronic form. Examples of such images are those used in video telephone systems and magnetic resonance imaging. Transmission of such electronic images over data lines, such as telephone lines, can take a significant amount of time. Further, storage of such data may take an enormous amount of memory.
Vector quantization (VQ) (a form of encoding) has been developed to reduce the number of data bits needed to represent an image. With a reduced number of data bits, the time to transmit the bits and the memory needed to store the data bits is also reduced. VQ deals with a block of samples (called a vector) at once, and as a result VQ has some performance advantages as compared with scalar quantization. VQ can be viewed as pattern matching, where input patterns or vectors are approximated by one of many stored patterns in a codebook. The resulting quantization error from such an approximation depends upon how well the stored patterns, referred to as codevectors, represent the input vectors. Consequently, codebook generation may be greatly improved by prior knowledge of the information source and is important to the performance of VQ.
Consider an image that is divided into numerous small areas called pixels (for picture element). Pixels are sufficiently small that the intensity of the image is approximately constant across the pixel area. For example, a black and white image of a house might be divided into a grid of 600 rows and 600 pixels per row. Each pixel would be like a small dot in the image. A block or group of pixels in the same region would form a vector which can be thought of as a small subimage. For example, a 6.times.6 square block of pixels forms a 36 element vector, which may be a portion of a shadow or part of the roof line against a light background.
Mean-removed VQ (MRVQ) is a special case of product codes. Product codes refer to a family of vector quantization methods in which one large codebook is replaced by more than one smaller codebook. As a result, the vector space represented by the overall quantizer is given as the Cartesian product of smaller vector spaces, and hence the name product codes. In MRVQ, the sample mean of each input vector is computed and then subtracted from every vector component. The resulting mean removed, or residual, vector is then vector quantized. The utility of MRVQ is that the residual vectors can be adequately represented with many fewer codevectors as compared to the original image vectors. The mean of each vector is also coded and included along with each codevector index. Since the mean is a scalar quantity, it is scalar quantized. As a result, the mean includes all of the possible quantization levels of the scalar quantizer. MRVQ can provide a significant reduction in the overall complexity of a VQ system as compared to direct VQ.
There are various well known forms of compression (e.g., discrete cosine transform) other than VQ.